summaryrefslogtreecommitdiff
path: root/app/[lng]/test/agentforce-poc-faq/page.tsx
blob: 493828d65eb4fd05cf5af22012597ac2c02fd7dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
'use client'

import { useState, useRef } from 'react'

export default function AgentforcePocPage() {
  const [isLoading, setIsLoading] = useState(true)
  const iframeRef = useRef<HTMLIFrameElement>(null)

  const handleIframeLoad = () => {
    setIsLoading(false)
  }

  const refreshIframe = () => {
    if (iframeRef.current) {
      setIsLoading(true)
      iframeRef.current.src = iframeRef.current.src
    }
  }

  return (
    <div className="min-h-screen bg-gray-50 p-4">
      <div className="max-w-7xl mx-auto">
        <div className="mb-6 flex items-center justify-between">
          <h1 className="text-3xl font-bold text-gray-900">
            Agentforce POC
          </h1>
          <button
            onClick={refreshIframe}
            className="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
          >
            새로고침
          </button>
        </div>

        <div className="bg-white rounded-lg shadow-lg overflow-hidden">
          {isLoading && (
            <div className="absolute inset-0 bg-white bg-opacity-75 flex items-center justify-center z-10">
              <div className="text-center">
                <div className="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"></div>
                <p className="text-gray-600">로딩 중...</p>
              </div>
            </div>
          )}

          <div className="relative" style={{ height: '800px' }}>
            <iframe
              ref={iframeRef}
              src="/agentforce-poc.html"
              title="Agentforce POC"
              className="w-full h-full border-0"
              onLoad={handleIframeLoad}
            />
          </div>
        </div>

        <div className="mt-4 text-sm text-gray-500 text-center">
          이 페이지는 Salesforce Agentforce POC를 iframe으로 표시합니다.
        </div>
      </div>
    </div>
  )
}